<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="div">
        {{msg}}
        {{msg1}}
        <div>
            <!--
               响应式：根据状态(只能在data中)的改变渲染页面
               数据代理/数据劫持 : 对data中的数据做一个增强
               vue会自动收集状态,自动更新状态
            -->
          
        </div>

        <div>
        双向原理:
           
        </div>

    </div>

    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script>
        const arr =[1,2,3]
        var app = Vue.createApp({

            data: function () {
                return {
                    msg:'hello vue!!!',
                    msg1:'hello vue!!!'
                }
            },
            // 存放一些方法，供事件调用
            methods: {
                onInput(event){
                    this.msg = event.target.value;
                }
            },


        }).mount('#div');

    </script>
</body>

</html>